/**
* @file whiskerWeaving.h
* Fev, 2014
* 
* @brief class to create apply whisker Weaving algorithm.
* 
* @author Antonio Miranda (amiranda@tecgraf.puc-rio.br )
* 
* @see 
*/

// includes
//----------

#ifndef _WHISKER_WEAVING_H_
#define _WHISKER_WEAVING_H_

#include <vector>
#include "topology.hpp"

using namespace std;

//
//////////////////////////////////////////////////////////////////////////
class loopPeace
{
public:
  int edge;
  int face;
  int adj_loop;
};

//
//////////////////////////////////////////////////////////////////////////
class loop
{
public:
  vector <loopPeace> peaces;
};


//
//////////////////////////////////////////////////////////////////////////
class whiskerWeaving
{
public:
  whiskerWeaving(void);
  whiskerWeaving(cTopology *top);
  ~whiskerWeaving(void);

  void process ();

private:
  cTopology *m_topol;

  vector <loop> loops;


  bool buildLoop (int curr_edge, loop &curr_loop);

  void getOppositeEdgeFace (int curr_edge, int curr_face, int &opp_edge, int &opp_face);
};


#endif